package com.luckynote.common.base.exception;

import com.luckynote.common.base.result.ResponseInfo;

/**
 * <pre>
 * *********************************************
 * Copyright LUCKY-NOTE.
 * All rights reserved.
 * ****************************************************
 *  Version       Date         Author            Desc
 *    v1.0       2019/6/29      bingo       自定义业务异常类
 * ****************************************************
 * </pre>
 */
public class BizException extends RuntimeException {

    private static final long serialVersionUID = 5440806154112822877L;

    /**
     * 系统响应信息
     */
    private ResponseInfo info;
    /**
     * 构建业务异常对象
     *
     * @param info 系统响应信息
     */
    public BizException(ResponseInfo info) {
        this.info = info;
    }

    /**
     * 构建业务异常对象
     *
     * @param info      系统响应信息
     * @param throwable 异常
     */
    public BizException(ResponseInfo info, Throwable throwable) {
        super(throwable);
        this.info = info;
    }

    public ResponseInfo getInfo() {
        return info;
    }

    public void setInfo(ResponseInfo info) {
        this.info = info;
    }
}
